<?php
$res= $_POST['a'] - $_POST['b'];
echo json_encode(compact('res'));